#{extends 'frame.html' /}

#{set title:'任务管理' /}



#{set 'moreStyles'}

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/admin/tasks.css'}" />

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/jquery.pagination.css'}" />

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/datePicker.css'}" />

#{/set}

<div class="contentCard">

	<div class="contentTitle">

		<span class="iconfont">&#xf00bf;</span>

		任务列表

	</div>

	<div id="taskFilterPanel">

		<div class="clearfix mb10">

			<span class="floatLeft mr10">平台</span>

			<select class="floatLeft mr10 lh" id="platform">

				<option value="">全部</option>

				#{list items:platforms, as:'p'}

				<option value="${p}">${p.title}</option>

				#{/list}

			</select>

			<span class="floatLeft mr10">终端</span>

			<select class="floatLeft mr10" id="device">

				<option value="">全部</option>

				#{list items:devices, as:'d'}

				<option value="${d}">${d.title}</option>

				#{/list}

			</select>

			<span class="floatLeft mr10">状态</span>

			<select class="floatLeft mr10" id="status">

				<option value="">全部</option>

				#{list items:taskStatus	, as:'s'}

				<option value="${s}">${s.title}</option>

				#{/list}

			</select>

		</div>

		

		<div class="clearfix">

			<span class="floatLeft mr10">店铺</span>

			<input type="text" id="shopName" class="floatLeft mr10 inputText" />

			<span class="floatLeft mr10">昵称</span>

			<input type="text" id="nick" class="floatLeft mr10 inputText" />

			<span class="floatLeft mr10">任务编号</span>

			<input type="text" id="txtTid" class="floatLeft mr10 inputText" style="width:150px" />

			<span class="floatLeft mr10">发布时间</span>

					<span class="floatLeft mr10 cal-date-input">

						<input class="inputDate start-date" id="modifyTimeStart" readonly="readonly" value=""  />

					</span>

					<span class="floatLeft mr10 med-cal-split">-</span>

					<span class="floatLeft mr10 cal-date-input">

						<input class="inputDate end-date" id="modifyTimeEnd" readonly="readonly" value="" />

					</span>

			<a class="stdColorButton floatLeft queryBtn lh mr20" href="javascript:;" id="queryBtn">查询</a>

			<span class="floatLeft mr10">导出条数</span>

			<input type="text" id="exportNum" class="floatLeft mr10 inputText" maxlength="4" value="50" style="width:50px" />

			<a class="stdColorButton floatLeft queryBtn" href="javascript:;" target="_blank" id="exportOverdue">导出任务</a>

		</div>

		

	</div>

	<div class="mt10">

		<table class="normTable">

			<thead>

				<tr>

					<td style="width:15%">任务编号</td>

					<td style="width:30%">商品信息</td>

					<td>平台</td>

					<td>店铺</td>

					<td>卖家昵称</td>

					<td>创建时间</td>

					<td>发布时间</td>

					<td>状态</td>

					<td>数量</td>

					<td>操作</td>

				</tr>

			</thead>

			<tbody id="taskContainer"></tbody>

		</table>

		<div id="noMsg">

			<div class="warnBox">

				<span class="iconfont">&#xf00b6;</span>

				没有任务!

			</div>

		</div>

		<div class="popWrapper" style="display: none;" id="tr_loading_mask">

			<div class="maskLayer"></div>

			<img class="tr_juhua" src="@{'/public/images/pre_loading.gif'}" />

		</div>

		<div class="pagin-btm clearFix"style="display: none;">

			<div class="pagination"></div>

		</div>

	</div>

</div>

<!-- 取消任务弹窗 -->

<div class="popWrapper" id="cancelWnd">

	<div class="maskLayer"></div>

	<div class="modalWnd">

		<a href="javascript:;" class="wnd_Close_Icon" title="关闭窗口"></a>

		<h3 class="topTile">撤销未接单任务</h3>

		<div class="modalWndInner">

			<div class="content-info">

				<p>

					<span class="mr-4">当前任务还有</span>

					<span class="red mr-4 cancledNum">1</span>

					<span>单未接手</span>

					<br/>

					<span class="mr-4">撤销将解冻押金</span>

					<span class="red mr-4 cancledPledge">112</span>

					<span class="mr-4">元，退回金币</span>

					<span class="red mr-4 cancledIngot">112</span>

					<span>个</span>

				</p>



			</div>



		</div>

		<div class="wndBotButtonSection">

			<a href="javascript:;" class="botButton btnPay stdColorButton">确认</a>

		</div>

	</div>

</div>

<!-- 任务列表模板-->

<textarea id="taskTemp" class="muban">

	{{#results}}

	<tr>

		<td class="tl">

			<a target="_blank" href="/admin/task/{{idStr}}" class="view-detail">{{idStr}}</a><span class="ml10">[点击查看]</span>

		</td>

		<td class="item-list">

			<div class="item-box">

				<div class="pic">

					<img src="{{itemPic}}" />

				</div>

				<p class="title">{{itemTitle}}</p>

			</div>

		</td>

		<td> <i class="plat_small {{platIcon}}"></i>

			{{platformStr}}

		</td>

		<td>{{shopName}}</td>

		<td>{{sellerNick}}<br/>{{sellerAdminNameStr}}</td>

		<td>{{createTimeStr}}</td>

		<td>{{publishTimeStr}}</td>

		<td>{{statusTitle}}</td>

		<td>{{totalOrderNum}}</td>

		<td>

			{{#cancelFlag}}

			<a href="javascript:;" class="view-detail cancel " taskId="{{idStr}}">撤销未接单任务</a><br/>

			{{/cancelFlag}}

			<a href="javascript:;" class="view-detail modify " taskId="{{idStr}}">修改商家要求</a>

		</td>

	</tr>

	{{/results}}

</textarea>

<!--任务修改窗口-->

<div class="popWrapper modifyTask" id="modifyTask">

	<div class="maskLayer"></div>

	<div class="modalWnd">

		<a href="javascript:void(0);" class="wnd_Close_Icon close" title="关闭窗口"></a>

		<h3 class="topTile">修改商家要求</h3>

		<div class="modalWndInner" style="width:400px">

			<form id="modifyTask">

				<div class="area">

					<span class="floatLeft mr10">任务需求：</span>

					<span class="floatLeft mr10"style="color:grey">（长度不超过200）</span>

					<textarea rows="5" cols="41" id="taskRequest" class="txtMemo inputMultiText" name="taskRequest"></textarea>

					<span id="errorf"></span>

				</div>

				<div class="area mt20">

					<span class="floatLeft mr10">商品重量：</span>

					<input type="text" class="inputText floatLeft ls long required" id="itemWeight" name="itemWeight" value="" />kg

					<span id="errorf"></span>

				</div>

			</form>

		</div>

		<div class="wndBotButtonSection">

			<a id="btnModifyTask" href="javascript:;" class="botButton stdColorButton">确认</a>

		</div>

	</div>

</div>

<!-- templates -->

#{set 'moreScripts'}

<script src="@{'/public/javascripts/date.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/mustache.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.datePicker.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.pagination.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.number.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/admin/tasks.js'}" type="text/javascript"></script>

<script type="text/javascript">App.module = 'tasklist';</script>

#{/set}